package com.xjgc.real_time.constant;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * @author: 小逗号
 * @date: 2023/8/9
 * @description:
 * @since:
 */
@Getter
@AllArgsConstructor
public enum MsiTaskMapping {
    /**
     * 配置,后续改成表
     */
    ZXJ_MES_MATNR("ZXJ_MES_MATNR", "物料编码增量", "com.xjgc.service.mes.ZxjMesMatnrService", "getShareData", true),
    ZXJ_MES_MBLNR("ZXJ_MES_MBLNR", "出入库增量", "com.xjgc.service.mesupgrade.ZxjMesMblnrService", "getShareData", true),
    ZXJ_MES_XBLNR("ZXJ_MES_XBLNR", "对账单增量", "com.xjgc.service.mesupgrade.ZxjMesXblnrService", "getShareData", true),
    ZXJ_ZSDSTR020("ZXJ_ZSDSTR020", "收据开具增量", "com.xjgc.service.general.ZxjZsdstr020Service", "getShareData", true),
    ZXJ_ZSDSTR017("ZXJ_ZSDSTR017", "认款/承兑接收", "com.xjgc.service.general.ZxjZsdstr017Service", "getShareData", true),
    ZXJ_ZSDSTR003("ZXJ_ZSDSTR003", "逾期欠款", "com.xjgc.service.general.ZxjZsdstr003Service", "getShareData", true),
    ZXJ_ZSDSTR004("ZXJ_ZSDSTR004", "应付账款", "com.xjgc.service.general.ZxjZsdstr004Service", "getShareData", true),
    ZXJ_MES_KPSQD("ZXJ_MES_KPSQD", "开票申请单", "com.xjgc.service.mes.IZxjMesKpsqdService", "getShareData", true),
    ZXJ_FSS_CLBXD("ZXJ_FSS_CLBXD", "差旅报销单", "com.xjgc.service.fss.IZxjFssClbxdService", "getShareData", true),
    ZXJ_ZSDSTR013("ZXJ_ZSDSTR013", "订货统计", "com.xjgc.service.general.ZxjZsdstr013Service", "getShareData", true),
    ZXJ_MES_PAAPN("ZXJ_MES_PAAPN", "采购预付款", "com.xjgc.service.mesupgrade.ZxjMesPaapaService", "getShareData", true),
    ZXJ_ZSDSTR027MX("ZXJ_ZSDSTR027MX", "研发项目费用信息", "com.xjgc.service.general.ZxjZsdstr027MxService", "getShareData", false),
    ZXJ_FSS_CLBXD_SAVE("ZXJ_FSS_CLBXD_SAVE", "差旅报销单入库", "com.xjgc.service.fss.IZxjFssClbxdService", "saveBatch", false),
    ZXJ_MES_VBELG("ZXJ_MES_VBELG", "销售开票", "com.xjgc.service.mesupgrade.ZxjMesVbelgService", "getShareData", true),
    ZXJ_MES_NBDD("ZXJ_MES_NBDD", "内部订单", "com.xjgc.service.mesupgrade.ZxjMesNbddService", "getShareData", true),
    ZXJ_MES_PONUM("ZXJ_MES_PONUM", "采购项目主数据", "com.xjgc.service.mesupgrade.ZxjMesPonumService", "getShareData", true),
    ZXJ_CRM_BID("ZXJ_CRM_BID", "crm投标", "com.xjgc.service.crm_sys.IZxjCrmBidService", "getShareData", true),
    ZXJ_MES_JCXX("ZXJ_MES_JCXX", "集采信息主数据", "com.xjgc.service.mesupgrade.ZxjMesJcxxService", "getShareData", false),
    ZXJ_MES_STLNR("ZXJ_MES_STLNR", "生产BOM", "com.xjgc.service.mesupgrade.IZxjMesStlnrService", "getShareData", true),
    ZXJ_MES_RSUNM("ZXJ_MES_RSUNM", "生产订单组件", "com.xjgc.service.mesupgrade.IZxjMesRsnumService", "getShareData", true),
    ZXJ_MES_EKBE("ZXJ_MES_EKBE", "采购订单历史", "com.xjgc.service.mesupgrade.ZxjMesJcxxService", "getShareData", true),
    ZXJ_MES_MKOL("ZXJ_MES_MKOL", "寄售库存", "com.xjgc.service.mesupgrade.ZxjMesMkolService", "getShareData", false),
    ZXJ_MES_GWZFJG("ZXJ_MES_GWZFJG", "SAP侧付款申请", "com.xjgc.service.mesupgrade.ZxjMesGwzfjgService", "getShareData", false),
    ZXJ_MES_POSNR("ZXJ_MES_POSNR", "WBS项目", "com.xjgc.service.mes.impl.ZxjMesPosidServiceImpl", "getShareData", true),
    ;

    private String taskCode;
    private String taskName;
    private String handClass;
    private String handMethod;
    private boolean requireBeginTime;


    public static MsiTaskMapping getTaskMapping(String taskCode) {
        for (MsiTaskMapping msiTaskMapping : MsiTaskMapping.values()) {
            if (msiTaskMapping.getTaskCode().equals(taskCode)) {
                return msiTaskMapping;
            }
        }
        return null;
    }

}
